package other.mvvm.activity.src.app_package.forget

fun forgetViewModel(
        packageName:String,
        activityClass:String
)="""
package ${packageName}
import cn.logicalthinking.mvvm.base.BaseViewModel
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.launch

class ${activityClass}ViewModel:BaseViewModel<${activityClass}Repository>() {
    override fun initRepository()= ${activityClass}Repository()
    
     /**
     * 校验验证码
     */
    fun versionCode(telphone: String, code: String, callback: () -> Unit) {
        if (email.isEmpty() ) {
            ToastUtils.showShort(Utils.getApp().getString(R.string.please_input_email))
            return
        }
        if (!RegexUtils.isPhone(email)) {
            ToastUtils.showShort(Utils.getApp().getString(R.string.please_input_correct_email))
            return
        }
        if (code.isEmpty()) {
            ToastUtils.showShort(Utils.getApp().getString(R.string.please_input_code))
            return
        }
        viewModelScope.launch {
             
        }
    }
    
    
}
"""